const proxy = require('http-proxy-middleware');

module.exports = function (app) {
  app.use(
    proxy(
      '/v2/',
      {
        target: 'https://www.jxc4.com/v2',
        changeOrigin: true,
        pathRewrite: {
          '^/v2/': '/'
        }
      }
    )
  );
  // app.use()...
};